package com.sun.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mos.secure.ext.annotations.DesensitizationProp;
import com.mos.secure.ext.enums.SensitiveTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 订单信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("enhance_product")
public class EnhanceProduct {

    @TableId(value = "pid", type = IdType.AUTO)
    private Integer pId;

    @DesensitizationProp(SensitiveTypeEnum.CHINESE_NAME)
    @TableField("pname")
    private String name;

    //自定义脱敏
    @DesensitizationProp(value = SensitiveTypeEnum.CUSTOM,preLength = 2,sufLength = 4)
    @TableField("price")
    private String price;

    @DesensitizationProp(SensitiveTypeEnum.CHINESE_NAME)
    @TableField("category_name")
    private String categoryName;
}